# from datetime import datetime
#
# from main import db
# #
# # 创建表
# class Users(db.Model):
#     """
#     新闻频道
#     """
#     __tablename__ = 'users'
#
#     id = db.Column(db.Integer, primary_key=True, doc='用户id')
#     name = db.Column(db.String(20), doc='用户名')
#     ctime = db.Column(db.DateTime, default=datetime.now, doc='创建时间')
#     utime = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now, doc='更新时间')
#     # sequence = db.Column(db.Integer, default=0, doc='序号')
#     # is_visible = db.Column(db.Boolean, default=False, doc='是否可见')
#     # is_default = db.Column(db.Boolean, default=False, doc='是否默认')
#
#
# class MessageBoard(db.Model):
#     """
#     新闻频道
#     """
#     __tablename__ = 'messageboard'
#     id= db.Column(db.Integer, primary_key=True, doc='用户id')
#     user_id = db.Column(db.Integer, db.ForeignKey('users.id'), doc='用户id')
#     user_name = db.Column(db.String(20), doc='用户名')
#     email = db.Column(db.String(20), doc='邮箱')
#     content = db.Column(db.String(500), doc='内容')
#     type = db.Column(db.String(20), doc='类型')
#     ctime = db.Column(db.DateTime, default=datetime.now, doc='创建时间')
#     utime = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now, doc='更新时间')